<?php
namespace App\Transformers;

use League\Fractal\TransformerAbstract;
use App\Model\BistroIncomeMonth;

class BistroIncomeMonthTransformer extends TransformerAbstract{

    public function transform(BistroIncomeMonth $item){
        return [
            'id' => $item->id,
            'bistro_id' => $item->bistro_id,
            'month' => $item->month,
            'year' => $item->year,
            'income' => $item->income,
            'outcome' => $item->outcome,
            'created_at' =>$item->created_at->toDateTimeString(),
            'updated_at' =>$item->updated_at->toDateTimeString()
        ];
    }
}